package com.pi.shisan.real.config;

import com.pi.shisan.LedWebApplication;
import com.pi.shisan.service.util.ComponentManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ws.schild.jave.MultimediaObject;
import ws.schild.jave.process.ProcessLocator;
import ws.schild.jave.process.ProcessWrapper;

//字体、音量大小 //启动图标
@Configuration
public class ComponentAutoConfig {

    @Bean
    public ComponentManager componentManager() {
        return new ComponentManager(LedWebApplication.getMergedSpi());
    }

    @Bean
    public ProcessLocator systemInProcessLocator() {
        return new ProcessLocator() {
            @Override
            public String getExecutablePath() {
                return "ffmpeg";
            }

            @Override
            public ProcessWrapper createExecutor() {
                return new ProcessWrapper(getExecutablePath());
            }
        };
    }

}
